package com.fair.concurrency;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/12/27 21:44
 */
public class AtomicIntegerTest
{
    static AtomicInteger ai = new AtomicInteger(10);

    public static void main(String[] args)
    {
        System.out.println(ai.getAndIncrement());
        //10--->11
        System.out.println(ai.incrementAndGet());
        //11--->12--->out
        System.out.println(ai.get());
    }
}
